import { Login, Home, Detail, My, Classify, Car, History, Layout } from '../views'

export interface RouteState {
	path: string
	element: React.LazyExoticComponent<any>
	title?: string 
	children?: RouteState[]
}

export const layoutChildRoute: RouteState[] = [{
	path: '/',
	element: Home,
	title: '首页'
},{
	path: '/classify',
	element: Classify,
	title: '分类'
},{
	path: '/car',
	element: Car,
	title: '购物车'
},{
	path: '/my',
	element: My,
	title: '我的'
}]

export const routes: RouteState[]= [{
	path: '/',
	element: Layout,
	children: layoutChildRoute
}, {
	path: '/login',
	element: Login,
}, {
	path: '/history',
	element: History
}, {
	path: '/detail',
	element: Detail
}]